package com.gitee.hermer.engine.jars.core.domain;

import java.util.List;

import com.gitee.hermer.boot.jee.commons.collection.CollectionUtils;
import com.gitee.hermer.boot.jee.commons.reflect.ClassUtils;

public class EngineConstant {

	public final static String STR_SPLIT = "-";
	public final static String STR_COMMA = ",";

	public final static String ENGINE_CONFIG_PROPERTIES_FILE_NAME = "engine-jars.properties";

	public final static String ENGINE_CONFIG_PROPERTIES_CLASS_PATH = ClassUtils.CLASSPATH_PREFIX+ENGINE_CONFIG_PROPERTIES_FILE_NAME;

	public final static String PROPERTIES_KEY_ENGINE_CONFIG_THREAD_POOL_SIZE = "${engine.jars.dependent.thread.pool.size}";
	public final static String PROPERTIES_KEY_ENGINE_CONFIG_THREAD_EXECUTE_TIMEOUT = "${engine.jars.dependent.thread.execute.timeout}";

	public static final String MODEL_PROPERTIES_KEY_APP_VERSION_KEY="com.jc.app.version";  
	public static final String MODEL_PROPERTIES_KEY_APP_MODEL_KEY="com.jc.app"; 


	public final static Integer DEFAULT_VALUES_ENGINE_CONFIG_THREAD_POOL_SIZE = 100;
	public final static Integer DEFAULT_VALUES_ENGINE_CONFIG_THREAD_EXECUTE_TIMEOUT = 60*1000; // ms 
	public final static String  DEFAULT_ENCODING = "utf-8";
	
	public final static String ANNOTATE_FIELD_NAME_APP_NAME = "appName";
	public final static String ANNOTATE_FIELD_NAME_APP_VERSION = "appVersion";
	public final static String ANNOTATE_FIELD_NAME_WORK_METHOD = "jobMethod";
	public final static String ANNOTATE_FIELD_NAME_WORK_VERSION = "jobVersion";

	public final static List<String> DEFAULT_VALUES_ENGINE_APP_SCAN_RESOURCES = CollectionUtils.newArrayList(new String[]{"xml","properties"}); //扫描模块中的资源配置


	public final static Integer DEFAULT_VALUES_UNRESTRICTED = -1;


	public final static String FILE_NAME_ENGINE_WORK_LIB = "work-libs";
	public final static String FILE_NAME_ENGINE_WORK_CONF = "work-confs";
	public final static String FILE_NAME_ENGINE_WORK_JAR = "work-jars";


	public final static String PROTOCOL_JAR_FILE = "jar:file";
	public final static String PROTOCOL_WINDOWS_FILE="file:/";
	public final static String PROTOCOL_UNIX_FILE="file://";
	public final static String PROTOCOL_CLASSPATH="classpath";

}
